#pragma once

#include"RB_Tree.h"

namespace bit
{
	template<class K>
	class set
	{
		class SetKeyOfT
		{
		public:
			const K& operator()(const K& key)
			{
				return key;
			}
		};

	public:
		typedef typename RB_Tree<K,const K, SetKeyOfT>::iterator iterator;
		typedef typename RB_Tree<K,const K, SetKeyOfT>::const_iterator const_iterator;

		iterator begin()
		{
			return _RBT.begin();
		}

		iterator end()
		{
			return _RBT.end();
		} 

		const_iterator begin() const
		{
			return _RBT.c_begin();
		}

		const_iterator end() const
		{
			return _RBT.c_end();
		}

		pair<iterator,bool> Insert(const K& key)
		{
			return _RBT.Insert(key);
		}

	private:
		RB_Tree<K, const K, SetKeyOfT> _RBT;
	};
}